package com.imooc.infra.repository.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.imooc.infra.repository.entity.TDataCenterRule;
import com.imooc.infra.repository.entity.TDataCenterStorage;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 18870
 * @since 2023-05-27
 */
public interface ITDataCenterStorageService extends IService<TDataCenterStorage> {

    TDataCenterStorage getByRuleId(Long ruleId);

    default TDataCenterStorage defaultGetOne(LambdaQueryWrapper<TDataCenterStorage> wrapper) {
        wrapper.last("limit 1");
        return getOne(wrapper);
    }
}
